/*
* Copyright 2025 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"



void setup_scr_get_order(lv_ui *ui)
{
	//Write codes get_order
	ui->get_order = lv_obj_create(NULL);
	ui->g_kb_get_order = lv_keyboard_create(ui->get_order);
	lv_obj_add_event_cb(ui->g_kb_get_order, kb_event_cb, LV_EVENT_ALL, NULL);
	lv_obj_add_flag(ui->g_kb_get_order, LV_OBJ_FLAG_HIDDEN);
	lv_obj_set_style_text_font(ui->g_kb_get_order, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_size(ui->get_order, 1024, 600);
	lv_obj_set_scrollbar_mode(ui->get_order, LV_SCROLLBAR_MODE_OFF);

	//Write style for get_order, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->get_order, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->get_order, lv_color_hex(0xf4f3ef), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->get_order, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes get_order_LoadingGuide
	ui->get_order_LoadingGuide = lv_img_create(ui->get_order);
	lv_obj_add_flag(ui->get_order_LoadingGuide, LV_OBJ_FLAG_CLICKABLE);
	lv_img_set_pivot(ui->get_order_LoadingGuide, 50,50);
	lv_img_set_angle(ui->get_order_LoadingGuide, 0);
	lv_obj_set_pos(ui->get_order_LoadingGuide, 227, 34);
	lv_obj_set_size(ui->get_order_LoadingGuide, 750, 400);

	//Write style for get_order_LoadingGuide, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_img_opa(ui->get_order_LoadingGuide, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes get_order_btn_2
	ui->get_order_btn_2 = lv_btn_create(ui->get_order);
	ui->get_order_btn_2_label = lv_label_create(ui->get_order_btn_2);
	lv_label_set_text(ui->get_order_btn_2_label, "<< 返回主菜单 " LV_SYMBOL_HOME " ");
	lv_label_set_long_mode(ui->get_order_btn_2_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->get_order_btn_2_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->get_order_btn_2, 0, LV_STATE_DEFAULT);
	lv_obj_set_width(ui->get_order_btn_2_label, LV_PCT(100));
	lv_obj_set_pos(ui->get_order_btn_2, 32, 29);
	lv_obj_set_size(ui->get_order_btn_2, 146, 39);

	//Write style for get_order_btn_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->get_order_btn_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->get_order_btn_2, lv_color_hex(0x2F92DA), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->get_order_btn_2, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->get_order_btn_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->get_order_btn_2, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->get_order_btn_2, 20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_color(ui->get_order_btn_2, lv_color_hex(0xb7b7b7), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_opa(ui->get_order_btn_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_spread(ui->get_order_btn_2, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_ofs_x(ui->get_order_btn_2, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_ofs_y(ui->get_order_btn_2, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->get_order_btn_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->get_order_btn_2, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->get_order_btn_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->get_order_btn_2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes get_order_btn_3
	ui->get_order_btn_3 = lv_btn_create(ui->get_order);
	ui->get_order_btn_3_label = lv_label_create(ui->get_order_btn_3);
	lv_label_set_text(ui->get_order_btn_3_label, "当前 Step 完成 " LV_SYMBOL_OK " ");
	lv_label_set_long_mode(ui->get_order_btn_3_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->get_order_btn_3_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->get_order_btn_3, 0, LV_STATE_DEFAULT);
	lv_obj_set_width(ui->get_order_btn_3_label, LV_PCT(100));
	lv_obj_set_pos(ui->get_order_btn_3, 30, 390);
	lv_obj_set_size(ui->get_order_btn_3, 150, 39);

	//Write style for get_order_btn_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->get_order_btn_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->get_order_btn_3, lv_color_hex(0x26B08C), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->get_order_btn_3, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->get_order_btn_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->get_order_btn_3, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->get_order_btn_3, 20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_color(ui->get_order_btn_3, lv_color_hex(0xb7b7b7), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_opa(ui->get_order_btn_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_spread(ui->get_order_btn_3, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_ofs_x(ui->get_order_btn_3, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_ofs_y(ui->get_order_btn_3, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->get_order_btn_3, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->get_order_btn_3, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->get_order_btn_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->get_order_btn_3, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes get_order_label_1
	ui->get_order_label_1 = lv_label_create(ui->get_order);
	lv_label_set_text(ui->get_order_label_1, "\n 当前操作为>>Step1\n 温区Ⅰ：\n 温区Ⅱ：\n 温区Ⅲ：");
	lv_label_set_long_mode(ui->get_order_label_1, LV_LABEL_LONG_WRAP);
	lv_obj_set_pos(ui->get_order_label_1, 25, 461);
	lv_obj_set_size(ui->get_order_label_1, 975, 108);

	//Write style for get_order_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->get_order_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->get_order_label_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->get_order_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->get_order_label_1, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->get_order_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_letter_space(ui->get_order_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_line_space(ui->get_order_label_1, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->get_order_label_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->get_order_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->get_order_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->get_order_label_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->get_order_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->get_order_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->get_order_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->get_order_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->get_order_label_1, 20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_color(ui->get_order_label_1, lv_color_hex(0xb7b7b7), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_opa(ui->get_order_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_spread(ui->get_order_label_1, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_ofs_x(ui->get_order_label_1, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_ofs_y(ui->get_order_label_1, 1, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes get_order_list_1
	ui->get_order_list_1 = lv_list_create(ui->get_order);
	ui->get_order_list_1_item0 = lv_list_add_btn(ui->get_order_list_1, LV_SYMBOL_EYE_CLOSE, "201 —2025-01-10");
	lv_obj_set_pos(ui->get_order_list_1, 29, 143);
	lv_obj_set_size(ui->get_order_list_1, 156, 208);
	lv_obj_set_scrollbar_mode(ui->get_order_list_1, LV_SCROLLBAR_MODE_OFF);

	//Write style state: LV_STATE_DEFAULT for &style_get_order_list_1_main_main_default
	static lv_style_t style_get_order_list_1_main_main_default;
	ui_init_style(&style_get_order_list_1_main_main_default);
	
	lv_style_set_pad_top(&style_get_order_list_1_main_main_default, 5);
	lv_style_set_pad_left(&style_get_order_list_1_main_main_default, 5);
	lv_style_set_pad_right(&style_get_order_list_1_main_main_default, 5);
	lv_style_set_pad_bottom(&style_get_order_list_1_main_main_default, 5);
	lv_style_set_bg_opa(&style_get_order_list_1_main_main_default, 255);
	lv_style_set_bg_color(&style_get_order_list_1_main_main_default, lv_color_hex(0xffffff));
	lv_style_set_bg_grad_dir(&style_get_order_list_1_main_main_default, LV_GRAD_DIR_NONE);
	lv_style_set_border_width(&style_get_order_list_1_main_main_default, 0);
	lv_style_set_radius(&style_get_order_list_1_main_main_default, 10);
	lv_style_set_shadow_width(&style_get_order_list_1_main_main_default, 20);
	lv_style_set_shadow_color(&style_get_order_list_1_main_main_default, lv_color_hex(0xb7b7b7));
	lv_style_set_shadow_opa(&style_get_order_list_1_main_main_default, 255);
	lv_style_set_shadow_spread(&style_get_order_list_1_main_main_default, 1);
	lv_style_set_shadow_ofs_x(&style_get_order_list_1_main_main_default, 1);
	lv_style_set_shadow_ofs_y(&style_get_order_list_1_main_main_default, 1);
	lv_obj_add_style(ui->get_order_list_1, &style_get_order_list_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style state: LV_STATE_DEFAULT for &style_get_order_list_1_main_scrollbar_default
	static lv_style_t style_get_order_list_1_main_scrollbar_default;
	ui_init_style(&style_get_order_list_1_main_scrollbar_default);
	
	lv_style_set_radius(&style_get_order_list_1_main_scrollbar_default, 3);
	lv_style_set_bg_opa(&style_get_order_list_1_main_scrollbar_default, 255);
	lv_style_set_bg_color(&style_get_order_list_1_main_scrollbar_default, lv_color_hex(0xffffff));
	lv_style_set_bg_grad_dir(&style_get_order_list_1_main_scrollbar_default, LV_GRAD_DIR_NONE);
	lv_obj_add_style(ui->get_order_list_1, &style_get_order_list_1_main_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

	//Write style state: LV_STATE_DEFAULT for &style_get_order_list_1_extra_btns_main_default
	static lv_style_t style_get_order_list_1_extra_btns_main_default;
	ui_init_style(&style_get_order_list_1_extra_btns_main_default);
	
	lv_style_set_pad_top(&style_get_order_list_1_extra_btns_main_default, 5);
	lv_style_set_pad_left(&style_get_order_list_1_extra_btns_main_default, 5);
	lv_style_set_pad_right(&style_get_order_list_1_extra_btns_main_default, 5);
	lv_style_set_pad_bottom(&style_get_order_list_1_extra_btns_main_default, 5);
	lv_style_set_border_width(&style_get_order_list_1_extra_btns_main_default, 0);
	lv_style_set_text_color(&style_get_order_list_1_extra_btns_main_default, lv_color_hex(0x0D3055));
	lv_style_set_text_font(&style_get_order_list_1_extra_btns_main_default, &lv_font_montserratMedium_12);
	lv_style_set_text_opa(&style_get_order_list_1_extra_btns_main_default, 255);
	lv_style_set_radius(&style_get_order_list_1_extra_btns_main_default, 3);
	lv_style_set_bg_opa(&style_get_order_list_1_extra_btns_main_default, 255);
	lv_style_set_bg_color(&style_get_order_list_1_extra_btns_main_default, lv_color_hex(0xffffff));
	lv_style_set_bg_grad_dir(&style_get_order_list_1_extra_btns_main_default, LV_GRAD_DIR_NONE);
	lv_obj_add_style(ui->get_order_list_1_item0, &style_get_order_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style state: LV_STATE_DEFAULT for &style_get_order_list_1_extra_texts_main_default
	static lv_style_t style_get_order_list_1_extra_texts_main_default;
	ui_init_style(&style_get_order_list_1_extra_texts_main_default);
	
	lv_style_set_pad_top(&style_get_order_list_1_extra_texts_main_default, 5);
	lv_style_set_pad_left(&style_get_order_list_1_extra_texts_main_default, 5);
	lv_style_set_pad_right(&style_get_order_list_1_extra_texts_main_default, 5);
	lv_style_set_pad_bottom(&style_get_order_list_1_extra_texts_main_default, 5);
	lv_style_set_border_width(&style_get_order_list_1_extra_texts_main_default, 0);
	lv_style_set_text_color(&style_get_order_list_1_extra_texts_main_default, lv_color_hex(0x0D3055));
	lv_style_set_text_font(&style_get_order_list_1_extra_texts_main_default, &lv_font_montserratMedium_12);
	lv_style_set_text_opa(&style_get_order_list_1_extra_texts_main_default, 255);
	lv_style_set_radius(&style_get_order_list_1_extra_texts_main_default, 3);
	lv_style_set_bg_opa(&style_get_order_list_1_extra_texts_main_default, 255);
	lv_style_set_bg_color(&style_get_order_list_1_extra_texts_main_default, lv_color_hex(0xffffff));
	lv_style_set_bg_grad_dir(&style_get_order_list_1_extra_texts_main_default, LV_GRAD_DIR_NONE);

	//The custom code of get_order.
	

	//Update current screen layout.
	lv_obj_update_layout(ui->get_order);

	//Init events for screen.
	events_init_get_order(ui);
}
